import { defineConfig } from 'vite'
import vue from '@vitejs/plugin-vue'
import { resolve } from "path";

// https://vitejs.dev/config/
export default defineConfig({
  plugins: [
      vue(),
  ],
  resolve: {
    alias: {
      "@": resolve("src"),
      comps: resolve("src/components"),
      api: resolve("src/api"),
      views: resolve("src/views"),
      utils: resolve("src/utils"),
      router: resolve("src/router"),
    },
  },
  base: "/",
  define: { 'process.env': {} },
  server: {
    port: 8080,
    // proxy: {
    //   "/admin": {
    //     target: "", // 后台接口
    //     changeOrigin: true,
    //     secure: false, // 如果是https接口，需要配置这个参数
    //     // ws: true, //websocket支持
    //   },
    // },
  }
})
